1. Field of the Invention
The present invention relates to data transmission, and more particularly to high speed operation thereof.
2. Description of the Prior Art
In order to exchange data, data is transmitted by installing transmission lines between computers. As one of such transmission methods, hitherto is known the start-stop synchronous communication method, which is shown in FIG. 1. The communication line is delivering an H level output in the absence of data. When transmitting data of 1 character (8 bits), the transmission side first sends a start bits (L level). The reception side, receiving it, generates a sampling pulse in an interval of a specific period T (1/baud rate) from after the half period (T/2) of the specific period T. On the other hand, the transmission side, successively to the start bit S, sends out data D0 to D7 and parity bit P sequentially by 1 bit each, in an interval of the specific period T. The reception side, by the sampling pulse, takes in the data and parity bit P on the communication line. In this way, when transmission of 8-bit data is over, the transmission side delivers an H level output as a stop bit E. The reception side, when correctly receiving the stop bit E, judges that the communication has been completed without error.
Data of 1 character (8 bits) is thus transmitted. The subsequent data will be similarly operated.
In such start-stop synchronous communication method, meanwhile, the transmission rate is determined by the period T of the sampling pulse. Therefore, by shortening the period T of the sampling pulse, the transmission rate is accelerated. However, when the period T is too short, errors are likely to occur, and the reliability may be lowered. That is, the transmission rate was limited by the period T of the sampling pulse.
Furthermore, in this communication method, the start bit S and stop bit E must be added to the front and rear ends. It further causes to slow down the transmission rate.
To solve these problems, the present inventor had already proposed new communication methods (U.S. patent application Ser. No. 410,206, Japanese Laid-open Patent Application HEI 2-262747). A hardware connection diagram of the communication method disclosed in the Japanese Laid-open Patent Application No. 2-262747 is shown in FIG. 2. A terminal 24 for RS-232C of a personal computer 1 and a terminal 25 for RS-232C of a personal computer 8 are connected with cable as shown in the diagram. A terminal RTS and a terminal DTR are originally terminals for use in modem interface, but they are used as output terminals in this example. Likewise, terminals CTS, DCD are used as input terminals instead of the intended use as terminals for modem interface.
It is supposed in the following explanation that data is transmitted from the computer 1 side to the computer 8 side. A floppy disk (not shown) storing the data to be transmitted is inserted into a disk drive 30. A receiving floppy disk (not shown) is inserted into a disk drive 40. The sending side CPU 2 reads out the data of the floppy disk through an interface 32. Here, meanwhile, it is supposed to send data in the unit of 8 bits (1 character).
In the memory 3, an encoding table as shown in FIGS. 3, 4 is stored. This table is intended to obtain an encoding code corresponding to each one of the values (there are 28) of 8-bit data (original data). For example, supposing the original data to be (00000000)2 (that is, 0 in decimal notation), the corresponding encoding code is 120. When the original data is (00010011)2 (19 in decimal notation), the encoding code is 102302. The encoding table is prepared according to rules, i.e., (1) the numeral of each figure should be any one of 0, 1, 2, 3, (2) adjacent figures have different numerals, (3) the numerical value always starts with 1 and ends with 0 or 2, and (4) the values from the first figure to the P-th figure in a P-figure encoding code do not coincide with the values from the first figure to the P-th figure of a Q-figure encoding code longer than P figures. The CPU 2 converts the original data to be transmitted into an encoding code according to this encoding table. For example, when the original data is (00000000)2, 120 is obtained.
A data transmission state is shown in FIG. 5. The CPU 2 sends out thus obtained encoding code 120 by 1 figure each in the sequence of 1, 2, 0. That is, using the terminals RTS, DTR (communication path 19), 0 is sent to the reception side as terminal RTS=L, terminal DTR=L, 1 as terminal RTS=L, terminal DTR=H, 2 as terminal RTS=H, terminal DTR=L, and 3 as terminal RTS=H, terminal DTR=H.
In the first place, the receiving side CPU 9 delivers 3 (terminal RTS=H, terminal DTR=H) toward the transmission side from the communication path 22 in order to tell that it is ready to receive. Receiving it, the sending side CPU 2 sends out 1 (terminal RTS=L, terminal DTR=H) from the communication path 19.
When 1 is sent in, the receiving side CPU 9 takes it in through the terminal CTS and terminal DCD (communication path 19). In the receiving side memory 10, too, the same encoding table as shown in FIGS. 3, 4 is stored. The CPU 9 checks when the received data 1 is present or not in the encoding table. Since there is no encoding code of 1, it waits for the next figure.
Meanwhile, the receiving side CPU 9, upon receiving the data 1, changes the value of the terminal RTS, terminal DTR (communication path 22) to 0. Detecting this change, the sending side CPU 8 recognizes that the reception side is ready to receive the next figure, and sends out the next figure 2 of the encoding code to the communication path 19. The receiving side CPU 9 detects the change of the state of the communication path 19, and recognizes that the data of the next figure has been sent (see rule (2) above). In other words, it is not necessary to use the sampling pulse as shown in FIG. 1. Receiving it, the receiving side CPU 9 checks when the encoding code of 12 is present or not. Since there is no encoding code of 12, it waits for next figure.
The receiving side CPU 9, upon receiving the data 2, changes the state of the communication path 22 from 0 to 2. The sending side CPU 8, monitoring this change, recognizes that the reception side is ready to receive next figure, and sends out the next figure 0 of the encoding code to the communication path 19. Receiving it, the receiving side CPU 9 checks when the encoding code of 120 is present or not. The encoding code 120 corresponds to (00000000)2. In the encoding code of 4 figures or more, nothing begins with 120 (see rule (4) above). Therefore, the receiving side CPU 9 obtains the original data (00000000)2 at this point.
The subsequent data is similarly transmitted. At this time, the value of the first figure and the value of the last figure of the encoding code are always different (see rule (3) above), the reception side recognizes that the first figure of the next data is sent in.
When exchanging the transmission side and reception side, it is arranged so that the newly receiving side sends the reception waiting value 3. As a result, the transmission side and reception side may be exchanged easily. The encoding code always begins with 1, and ends with 0 or 2 (see rule (3) above), so that there is no risk of confusion with the reception waiting value 3.
In this method of transmission, sampling pulse is not necessary. Therefore, the speed of transmitting the encoding code does not depend on the period of the sampling pulse, but it depends on the processing speed of the CPU. Since the processing speed of the CPU 2, 9 is very fast, high speed transmission is realized.
Furthermore, since the start bit and end bit are not necessary, higher speed is also possible from this aspect. In addition, the length of the encoding code ranges from the shortest of 3 figures to the longest of 7 figures. Therefore, as compared with the serial transmission system of 8-bit data, it is possible to increase the speed furthermore.
Thus, in the transmission method shown in FIG. 2 through FIG. 5, high speed transmission is realized by making use of the high speed processing of the CPU. It, however, involves the following problems.
In the prior transmission method, in order to do without sampling pulse, the adjacent figures of the encoding code always have different values (rule (2) above). That is, by the change of the value being sent in, it is known that the next figure is sent in. It is thus restricted that the adjacent figures must have different values. Accordingly, the encoding code becomes long, and increase of the transmission speed is limited.
It holds true in the last figure of certain data and the beginning figure of the next data. That is, the last figure of the encoding code and the beginning figure of the encoding code transmitted next must not be a same value. In order to maintain always this relation, it is limited that always different values must be given to the beginning figure and the ending figure of encoding code (see rule (3) above). It also causes to extend the encoding code, and impede the high speed tendency of the communication speed.